package com.taoyi.mhouse.adapter;

import com.taoy.recyclebinder.EnumMapBindAdapter;

/**
 * Created by tempo on 2015/11/13.
 */
public class ShoppingHomeAdapter extends EnumMapBindAdapter<ShoppingHomeAdapter.ViewType> {
    public enum ViewType {
        BANNER,FOURENTRY,GOODS
    }
    @Override
    public ViewType getEnumFromPosition(int position) {
        ViewType viewType;
        switch(position){
            case 0:
                viewType= ViewType.BANNER;break;
            case 1:
                viewType= ViewType.FOURENTRY;break;
            default:
                viewType=ViewType.GOODS;break;

        }
        return viewType;
    }

    @Override
    public ViewType getEnumFromOrdinal(int ordinal) {
        return ViewType.values()[ordinal];
    }


}
